package com.itheima.a01mystream;

import java.util.HashMap;

public class StreamDemo3 {
    public static void main(String[] args) {
        /**
         * 双列集合获取Stream流
         */

        HashMap<String, Integer> map = new HashMap<String, Integer>();
        map.put("aaa", 111);
        map.put("bbb", 222);
        map.put("ccc", 333);
        map.put("ddd", 444);
        map.keySet().stream().forEach(key -> System.out.println(key));
        map.entrySet().stream().forEach(entry -> System.out.println(entry));
    }
}
